package com.xjh.t.impl;

import com.xjh.t.domain.Permission;
import com.xjh.t.mapper.PermissionMapper;
import com.xjh.t.service.IPermissionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.io.Serializable;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jobob
 * @since 2020-02-24
 */
@Service
@Transactional
public class PermissionServiceImpl extends ServiceImpl<PermissionMapper, Permission> implements IPermissionService {

    @Override
    public boolean removeById(Serializable id) {

        PermissionMapper permissionMapper = this.getBaseMapper();

        permissionMapper.deleteRolePermissionByPid(id);
        return super.removeById(id);
    }
}
